package br.com.admin.validator;

import java.util.ArrayList;
import java.util.List;

import br.com.admin.domain.DataSource;
import br.com.commons.utility.validator.NullValidationRule;
import br.com.commons.utility.validator.Validation;
import br.com.commons.utility.validator.Validator;

public class DataSourceValidator extends Validator {
	
	protected List<Validation> validate(Object object) {
		DataSource dataSource = DataSource.class.cast(object);
		List<Validation> validations = new ArrayList<Validation>();
		validations.add(new Validation(dataSource.getDriver(), NullValidationRule.CHECK_NULL_OBJECT, "erro no driver"));
		return validations;
	}

}
